/**
 * Created by kurry on 2017/7/11.
 */

import React, { PureComponent } from 'react';
import Reflv from '../Reflv/index'

console.log(Reflv);
class VideoPlayer extends PureComponent {
constructor(props){
super(props)
  this.state={
    link:'',
    videoType:''
  }
}

componentWillReceiveProps(props){
  console.log(props);
this.setState({
  link:props.oneClassInfo.link,
  videoType: props.oneClassInfo.type
})
}

    render() {
      console.log(this);
        return (
            <div>
              <Reflv
                url={this.state.link}
                type={this.state.videoType}
                isLive
                cors
                controls
                config={{
                  enableWorker: true,
                  enableStashBuffer: false,
                  stashInitialSize: 128,
                }}
              />
            </div>

        )
    }
}

export default VideoPlayer
